package com.smart.wechat.login.common;

/**
 * Code值
 * @author xuedi
 */
public enum ResponseCodeEnum {

    SUCCESS(0, "成功"),
    FAIL(-1, "失败"),
    LOGIN_ERROR(1000, "用户名或密码错误"),
    UNKNOWN_ERROR(2000, "未知错误"),
    PARAMETER_ILLEGAL(2001, "参数不合法"),
    TOKEN_INVALID(2002, "Token Invalid"),
    TOKEN_SIGNATURE_INVALID(2003, "Token Check Invalid"),
    TOKEN_EXPIRED(2004, "Token Overdue"),
    TOKEN_MISSION(2005, "Token Lose"),
    REFRESH_TOKEN_INVALID(2006, "刷新Token无效"),
    SMS_CODE_OVERTIME(2007, "短信验证码已超时"),
    MOBILE_PHONE_ERROR(2008, "手机号码输入有误"),
    SMS_CODE_ERROR(2009, "短信验证码输入错误"),
    INVITE_MOBILE_PHONE_ERROR(3000, "邀请人手机号码不存在"),
    PASSWORD_ERROR(3001, "用户密码格式不正确"),
    OPENID_FAIL(40003, "微信OpenId获取失败，请前往微信授权页面");

    private int code;

    private String message;

    ResponseCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
